CC = gcc
CFLAGS = -I ~/rocopenssl/include
LDFLAGS = -L ~/rocopenssl/lib64 -lcrypto

TARGET1 = tr
TARGET2 = tsm3

SRCS1 = testrand.c
SRCS2 = testsm3.c

OBJS1 = $(SRCS1:.c=.o)
OBJS2 = $(SRCS2:.c=.o)

all: $(TARGET1) $(TARGET2)

$(TARGET1): $(OBJS1)
	$(CC) $(OBJS1) -o $@ $(LDFLAGS)

$(TARGET2): $(OBJS2)
	$(CC) $(OBJS2) -o $@ $(LDFLAGS)

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -f $(OBJS1) $(OBJS2) $(TARGET1) $(TARGET2)
